package com.efe.ms.esservice.model;


import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.util.Date;

/**
 * 产品实体
 * @author hhx
 */
@Document(indexName = "product", shards = 1, replicas = 0)
public class ProductDocument implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 6815285421448361213L;
	
	@Id
    private String id;
	
    @Field(type= FieldType.Text,fielddata=true)
    private String productName;
    
    @Field(type= FieldType.Text,fielddata=true)
    private String productDesc;
    
    @Field(type= FieldType.Text,fielddata=true)
    private String  menu_name;

    private Date createTime= new Date();

    private Date updateTime= new Date();

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductDesc() {
        return productDesc;
    }

    public void setProductDesc(String productDesc) {
        this.productDesc = productDesc;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

	public String getMenu_name() {
		return menu_name;
	}

	public void setMenu_name(String menu_name) {
		this.menu_name = menu_name;
	}

	@Override
	public String toString() {
		return "ProductDocument [id=" + id + ", productName=" + productName + ", productDesc=" + productDesc
				+ ", menu_name=" + menu_name + ", createTime=" + createTime + ", updateTime=" + updateTime + "]";
	}

	
    
    
    
}
